<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head th:replace="_fragments :: head(~{::title})">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>LENSTAR-时间轴</title>
    <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.css">
    <link rel="stylesheet" type="text/css" href="../static/css/myStyle.css">
    <link rel="stylesheet" href="../static/css/timeline.css">
</head>
<body>
    <!--导航栏-->
    <nav id="nav" th:replace="_fragments :: menu(4)" class="gird-header">
        <div class="ui container">
            <div class="ui inverted secondary stackable menu">
                <h2 class="ui olive header item" style="font-family: STSong">LENSTAR</h2>
                <!--<div class="right m-item item m-mobile-hide">-->
                <a href="./index.html" class="m-item item m-mobile-hide"><i class="home icon"></i>首页</a>
                <a href="types.html" class="m-item item m-mobile-hide"><i class="clone outline icon"></i>分类</a>
                <a href="tags.html" class="m-item item m-mobile-hide"><i class="tags icon"></i>标签</a>
                <a href="./archives.html" class="active m-item item m-mobile-hide"><i class="align justify icon"></i>归档</a>
                <a href="about.html" class="m-item item m-mobile-hide"><i class="info icon"></i>关于我</a>
                <!--</div>-->
                <div class="m-item right item m-mobile-hide">
                    <form name="search" action="#" th:action="@{/search}" method="post" target="_blank">
                        <div class="ui icon transparent inverted input">
                            <input type="text" name="query" placeholder="Search...." value="" th:value="${query}">
                            <i class="search link icon"></i>
                        </div>
                    </form>
                </div>
            </div>
        </div>
        <a href="#" class="ui menu toggle button m-right-top m-mobile-show"
           style="background-color: rgba(0,0,0,0); color: gainsboro">
            <i class="sidebar icon"></i>
        </a>
    </nav>

    <br>
    <br>
    <br>
    <br>
    <br>
    <!--中间内容-->
    <div class="doc-container m-padded-tb-massivex m-opacity" id="doc-container">
        <th:block >
            <section class="timeline">
                <ul>
                    <li class="" th:each="blog : ${blogs}">
                        <div>
                            <time th:text="${#dates.format(blog.updateTime,'yyyy-MM-dd')}">2020/01/01</time>
                            <div class="scientist" >
                                <a href="#" target="_blank" th:href="@{/blog/{id}(id=${blog.id})}">
                                    <h3 class="state" style="text-align:center;font-size: 16px;color: #000;" th:text="${blog.title}">文章标题</h3>
                                </a>
                            </div>
                        </div>
                    </li>
                </ul>
            </section>
        </th:block>
    </div>

    <!--置顶图标-->
    <div id="toolbar" class="m-padded-tb-large m-fixed m-right-bottom">
        <a href="#" class="ui teal icon button"><i class="chevron up icon"></i> </a>
    </div>

    <br>
    <br>
    <br>
    <!--底部栏-->
    <footer th:replace="_fragments :: footer" class="ui inverted vertical m-padded-tb-massive">
        <div class="ui center aligned container">
            <div class="ui inverted divided stackable grid">
                <div class="four wide column">
                    <img src="../static/images/wechat.jpg" alt="" style="width: 100px;">
                </div>
                <div class="four wide column">
                    <h4 class="ui inverted header m-text-spaced m-text-thin">最新博客</h4>
                    <div class="ui inverted link list">
                        <a href="" class="item">Java（User Story）</a>
                        <a href="" class="item">Linux（User Story）</a>
                        <a href="" class="item">Redis（User Story）</a>
                    </div>
                </div>
                <div class="four wide column">
                    <h4 class="ui inverted header m-text-spaced m-text-thin">联系我</h4>
                    <div class="ui inverted link list">
                        <a href="" class="item">邮箱：XX181028@163.com</a>
                        <a href="" class="item">QQ：1412265423</a>
                    </div>
                </div>
                <div class="four wide column">
                    <h4 class="ui inverted header m-text-spaced m-text-thin">LENSTAR</h4>
                    <p class="m-text-spaced m-text-thin m-opacity-mini" style="color: gainsboro">
                        这是我的个人博客，会分享我所学到的任何知识，希望和大家一起共同进步.....
                    </p>
                </div>
            </div>
            <div class="ui inverted section divider"></div>
            <p class="m-text-spaced m-text-thin m-opacity-mini" style="color: gainsboro">
                Copyright © 2020-2021 LENSTAR Designed by LENSTAR
            </p>
        </div>
    </footer>

<script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.js"></script>
<script src="../static/lib/waypoints/jquery.waypoints.min.js" th:src="@{/lib/waypoints/jquery.waypoints.min.js}"></script>
<script src="../static/js/timeline.js" th:src="@{/js/timeline.js}"></script>

<!--/*/</th:block>/*/-->
    <script>
        // 点击按钮触发事件
        $('.menu.toggle').click(function () {
            $('.m-item').toggleClass('m-mobile-hide');
        })

        // 最新博客
        function newBlog() {
            $.get({
                url:/*[[@{/newBlog}]]*/"/newBlog",
                success:function (data) {
                    //这里的data是后台传来的数据
                    document.getElementById("newBlog-1").innerText = data[0].title;
                    document.getElementById("newBlog-2").innerText = data[1].title;
                    document.getElementById("newBlog-3").innerText = data[2].title;
                    document.getElementById("newBlog-1").href = "/blog/"+data[0].id;
                    document.getElementById("newBlog-2").href = "/blog/"+data[1].id;
                    document.getElementById("newBlog-3").href = "/blog/"+data[2].id;
                }
            });
        }
        newBlog();
    </script>
</body>
</html>